<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>

<!--请求后台会有跨域问题 可以导入cros配置类或者使用注解@CrossOrign（*）-->
<div id="app">
    <ul>
        <li>姓名：{{info.data.name}}</li>
        <li>url：{{info.data.url}}</li>
    </ul>
</div>

<!-- 生产环境版本，优化了尺寸和速度 -->
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<!--axios 通信的使用-->
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script type="text/javascript">
    var vm = new Vue({
        el: "#app",
        data() {
            return{
                info: {
                    data: {
                        name: "",
                        url: "",
                        address: {
                            street: "",
                            city: "",
                            country: ""
                        },
                    }

                }
            }
        },
        mounted() {
            console.log("ssssssss")
            axios.get("http://localhost:8091/contents/vue")
                .then(respose => this.info = respose.data)
        }
    })
</script>
</body>
</html>